﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using Libreria.SIG.Negocio;


public partial class ReservaMovil : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["cs"] = ConfigurationManager.ConnectionStrings["SIG"].ConnectionString;
        Session["datetime"] = DateTime.Now.ToShortDateString();
    }

    protected void FormView1_DataBound1(object sender, EventArgs e)
    {
        FormView form = (FormView)sender;
        if (form.CurrentMode == FormViewMode.Insert)
        {
            ((TextBox)form.FindControl("FechaCompraTextBox")).Text = DateTime.Now.ToString();
        }
    }
    protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
    {
        Int32 menu;
        Int32.TryParse(((DropDownList)sender).SelectedValue, out menu);
        ((TextBox)FormView1.FindControl("ValorCompraTextBox")).Text = (new TarifaNegocio()).consultarTarifas(menu, Session["Usuario.Perfil"].ToString(), Session["cs"].ToString()).ToString();
    }
    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void InsertButton_Click(object sender, EventArgs e)
    {

    }

    protected void ObjectDataSourceodsVenta_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
    {
        Labelmensaje.Text = e.OutputParameters["mensaje"].ToString();
    }
}
